package com.laycoding.common.service;

import com.laycoding.common.annotation.RpcService;
import com.laycoding.common.entity.User;
import com.laycoding.layrpc.annotation.LayRpcService;
import com.laycoding.layrpc.entity.LayRpcResponse;
import javafx.scene.chart.ValueAxis;

@LayRpcService(value = "userService")
public class UseServiceImpl implements UserService {
    @Override
    public LayRpcResponse getUserName(String name) {
        LayRpcResponse layRpcResponse = new LayRpcResponse();
        layRpcResponse.setData("桂大大yoO"+name);
        return layRpcResponse;
    }

    @Override
    public LayRpcResponse getUser(String name) {
        User user = new User();
        user.setName(name);
        user.setAge(22);
        LayRpcResponse<User> layRpcResponse = new LayRpcResponse<>();
        layRpcResponse.setData(user);
        return layRpcResponse;
    }
}
